<?php
abstract class db_connection{
    protected $db;
	protected $dsn = 'mysql:dbname=sign_in;host=localhost';
    protected $user = 'root';
	protected $password = '';

    public function con(){
		try {
			$this->db = new PDO($this->dsn,$this->user,$this->password,array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true));
			$this->db->exec("SET NAMES utf8");
		} catch (PDOException $e) {
			echo 'Connection failed: ' . $e->getMessage();print_r($this->db->errorInfo());
		}
	}
    public function db_connection(){
		try {
			$this->db = new PDO($this->dsn,$this->user,$this->password,array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true));
			$this->db->exec("SET NAMES utf8");
		} catch (PDOException $e) {
			echo 'Connection failed: ' . $e->getMessage();print_r($this->db->errorInfo());
		}
	}

}
?>
